<template>
  <div class="app-container ohn">
    <el-divider content-position="left">基本信息</el-divider>
    <el-descriptions class="margin-top" title="" :column="3" size="small">
      <el-descriptions-item>
        <template slot="label"> 报告编号 Client </template>
        {{ WorksheetDetail.workOrderNum }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 开单人 Attn </template>
        {{ WorksheetDetail.issuer }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 加急情况 Agree to subcontract </template>
        {{ WorksheetDetail.busyStatus }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 开单时间 Date </template>
        {{ WorksheetDetail.gmtCreate }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 出单时间 Date </template>
        {{ WorksheetDetail.gmtOutput }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 是否退样 Agree to subcontract </template>
        {{ WorksheetDetail.withdraw }}
      </el-descriptions-item>
      <el-descriptions-item>
        <template slot="label"> 检测描述 Desc </template>
        {{ WorksheetDetail.testDesc }}
      </el-descriptions-item>
    </el-descriptions>
    <el-divider content-position="left">样品单明细</el-divider>
    <vxe-table
      ref="xTable"
      border
      show-footer
      show-overflow
      class="editable-footer mb20"
      :row-config="{ isHover: true }"
      :export-config="{}"
      :data="WorksheetDetail.testWorkOrderItemList"
    >
      <vxe-column type="seq" width="60" :title="'序号 Num'" align="right" />
      <vxe-column field="sampleDesc" :title="'样品描述\nSampleDesc'" />
      <vxe-column
        field="sampleLocation"
        :title="'取样部位(位置)\nSampleLocation'"
      />
      <vxe-column
        field="testItemsMethod"
        :title="'测试项目及测试方法\nTestItemsMethod'"
      />
      <vxe-column field="remark" :title="'备注\nremark'" />
      <vxe-column field="testingItem" :title="'测试项目 Test Item'" />
      <vxe-column field="accordingTo" :title="'判定依据 According to'" />
      <vxe-column field="remark" :title="'备注 Remark'" />
    </vxe-table>
  </div>
</template>

<script>
export default {
  props: {
    WorksheetDetailData: {
      type: Object
    }
  },
  data() {
    return {
      WorksheetDetail: {}
    }
  },
  watch: {
    WorksheetDetailData: {
      handler(newVal, oldVal) {
        this.WorksheetDetail = this.WorksheetDetailData
      },
      deep: true
    }
  },
  methods: {}
}
</script>
